package com.liu.frame.adapter;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.liu.frame.R;
import com.liu.frame.base.BaseRecyclerViewAdapter;
import com.liu.frame.base.BaseViewHolder;
import com.liu.frame.beans.MessageBean;

import java.util.List;

/**
 * Created by 刘智强 on 2017/2/17.
 */

public class MessageAdapter extends BaseRecyclerViewAdapter<MessageBean.MessageCenterBean> {
    public MessageAdapter(Context context, List<MessageBean.MessageCenterBean> datas, int layoutId) {
        super(context, datas, layoutId);
    }

    @Override
    protected void bindData(BaseViewHolder holder, MessageBean.MessageCenterBean data, final int position) {
        View rootView=holder.getRootView();
        TextView tv_name = holder.getView(R.id.tv_name);
        TextView tv_content = holder.getView(R.id.tv_content);
        if (data != null) {
            tv_name.setText(data.getMsg_id());
            tv_content.setText(data.getTitile());
        }
//        rootView.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//                onItemClickListner.onItemClickListner(v,position);
//
//            }
//        });
    }
}
